<include file="public/header" />
<include file="public/left" />
<div id="append_parent"></div>
<div id="ajaxwaitid"></div>
<div class="page">
	<div class="flexigrid">

		<div class="mDiv">
			<div class="ftitle">
				<h3>会员审核列表</h3>
				<h5>(共{$count}条记录)</h5>
			</div>
			<div title="刷新数据" class="pReload"><i class="fa fa-refresh"></i></div>
			<form class="navbar-form form-inline" action="" method="get">
				<div class="sDiv">
					<div class="sDiv2">
						<select name="status" class="select">
							<option value="">会员状态</option>
							<option value="0" <eq name="status" value="0">selected </eq>>待审核</option>
							<option value="1" <eq name="status" value="1">selected </eq>>已通过</option>
							<option value="-1" <eq name="status" value="-1">selected </eq>>拒绝通过</option>
						</select>
						<input type="text" class="qsbox" name="keyword" placeholder="可搜索昵称或手机号码" value="{$keyword}">
						<input  class="btn"type="submit" value="搜索">
					</div>
				</div>
			</form>
		</div>

		<div class="hDiv">
			<div class="hDivBox">
				<table cellspacing="0" cellpadding="0">
					<thead>
					<tr>

						<th class="sign" axis="col0">
							<div style="width: 24px;"><i class="ico-check"></i></div>
						</th>
						<th align="left" abbr="article_title" axis="col3" class="">
							<div style="text-align: left; width: 100px;" class="">ID</div>
						</th>
						<th align="left" abbr="ac_id" axis="col4" class="">
							<div style="text-align: left; width: 200px;" class="">会员昵称</div></th>
						<th align="left" abbr="ac_id" axis="col4" class="">
							<div style="text-align: left; width: 100px;" class="">手机号码</div></th>
						<th align="center" axis="col1" class="handle">
							<div style="text-align: center; width: 150px;">操作</div>
						</th>
						<th style="width:100%" axis="col7">
							<div></div>
						</th>
					</tr>
					</thead>
				</table>
			</div>
		</div>
		<div class="bDiv" style="height: auto;">
			<div id="flexigrid" cellpadding="0" cellspacing="0" border="0">
				<table>
					<tbody>
					<foreach name="list" item="vo" key="k" >
						<tr>
							<td class="sign">
								<div style="width: 24px;"><i class="ico-check"></i></div>
							</td>
							<td align="left" class="">
								<div style="text-align: left; width: 100px;">{$vo.id}</div>
							</td>
							<td align="left" class="">
								<div style="text-align: left; width: 200px;"><img src="{$vo.headimage}" style="height: 20px;">{$vo.nickname}-<eq name="vo.sex" value="1">男<else />女</eq></div>
							</td>
							<td align="left" class="">
								<div style="text-align: left; width: 100px;">{$vo.mobile}</div>
							</td>
							<td align="center" class="handle">
								<div style="text-align: center; width: 170px; max-width:170px;">
									<eq name="$vo['status']" value='0'>
										<a class="btn red"  href="javascript:void(0)" data-url="{:url('Membership/list_index')}"  data_status="1"  data-name="确认通过审核？" data-id="{$vo.id}" onclick="blackfun(this)">通过审核</a>

										<a class="btn red"  href="javascript:void(0)" data-url="{:url('Membership/list_index')}"  data_status="-1" data-name="确认拒绝通过审核?"  data-id="{$vo.id}"  onclick="blackfun(this)">不通过审核</a>
									</eq>
								</div>
							</td>
							<td align="" class="" style="width: 100%;">
								<div>&nbsp;</div>
							</td>
						</tr>
					</foreach>
					</tbody>
				</table>
			</div>
			<div class="iDiv" style="display: none;"></div>
		</div>
		{$list->render()}
		<!--分页位置-->
	</div>
</div>
<script>
	function blackfun(obj){
		var confirm=$(obj).attr('data-name');
		var data_status = $(obj).attr('data_status');
		var data_id = $(obj).attr('data-id');
		layer.confirm(confirm, {
			btn: ['确定', '取消'] //按钮
		}, function () {
			$.ajax({
				type: 'post',
				url: $(obj).attr('data-url'),
				data : {
					id:data_id,
					data_status:data_status
				},
				dataType: 'json',
				success: function (data) {
					if (data.code == 1) {
						window.location.reload();
					} else {
						layer.alert(data, {icon: 2});  //alert('删除失败');
					}
				}
			})
		}, function () {
		});
	}
</script>
</body>
</html>
</html>